﻿@{
    ViewBag.Title = "updUserInfo";
    Layout = "~/Views/Shared/_ViewMenu.cshtml";
}
<script src="/Content/After/js/jquery.min.js"></script>
<script>
    function updUserInfodo(AuthorId)
    {
        var AuthorName=$("#AuthorName").val();
        var AuthorUrl=$("#AuthorUrl").val();
        var AuthorParentId=$("#AuthorParentId").val();
        $.ajax({
            type:'post',
            url:'/AuthorInfo/FnupdUserInfodo',
            data:{
                AuthorId:AuthorId,AuthorName:AuthorName,
                AuthorUrl:AuthorUrl,AuthorParentId:AuthorParentId
            },
            success:function(mes){
                if(mes>0)
                {
                    alert("已修改！");
                    location.href = "/AuthorInfo/Index";
                }
                else{
                    alert("修改失败！");
                }
            }
        })
    }

</script>
@using ZX.HIS.Model;

<div>
    @{
          ZX.HIS.Model.AuthorInfo p= ViewBag.AuthorInfo;
    }
    <table>
        <tr>
            <td>名称：</td><td><input id="AuthorName" type="text" value="@p.AuthorName"/></td>
        </tr>
        <tr>
            <td>路径：</td>
            <td><input id="AuthorUrl" type="text" value="@p.AuthorUrl"/></td>
        </tr>
        <tr>
            <td>上级菜单：</td>
            <td>@Html.DropDownList("AuthorParentId")</td>
        </tr>
        <tr>
            <td><input id="Button1" type="button" value="保存" onclick="updUserInfodo(@p.AuthorId)" /></td>
           
        </tr>
    </table>
</div>